home *** CD-ROM | disk | FTP | other *** search
/ NeXTSTEP 3.3 (Developer)…68k, x86, SPARC, PA-RISC] / NeXTSTEP 3.3 Dev Intel.iso / NextDeveloper / Headers / appkit / Matrix.h < prev    next >
Text File  |  1992-09-11  |  6KB  |  208 lines

  1. /*
  2.     Matrix.h
  3.     Application Kit, Release 2.0
  4.     Copyright (c) 1988, 1989, 1990, NeXT, Inc.  All rights reserved. 
  5. */
  6.  
  7. #import "Control.h"
  8. #import "color.h"
  9.  
  10. /* Matrix Constants */
  11.  
  12. #define NX_RADIOMODE        0
  13. #define NX_HIGHLIGHTMODE    1
  14. #define NX_LISTMODE        2
  15. #define NX_TRACKMODE        3
  16.  
  17. @interface Matrix : Control
  18. {
  19.     id                  cellList;
  20.     id                  target;
  21.     SEL                 action;
  22.     id                  selectedCell;
  23.     int                 selectedRow;
  24.     int                 selectedCol;
  25.     int                 numRows;
  26.     int                 numCols;
  27.     NXSize              cellSize;
  28.     NXSize              intercell;
  29.     float               backgroundGray;
  30.     float               cellBackgroundGray;
  31.     id                  font;
  32.     id                  protoCell;
  33.     id                  cellClass;
  34.     id                  nextText;
  35.     id                  previousText;
  36.     SEL                 doubleAction;
  37.     SEL                 errorAction;
  38.     id                  textDelegate;
  39.     struct _mFlags {
  40. #ifdef __BIG_ENDIAN__
  41.     unsigned int        highlightMode:1;
  42.     unsigned int        radioMode:1;
  43.     unsigned int        listMode:1;
  44.     unsigned int        allowEmptySel:1;
  45.     unsigned int        autoscroll:1;
  46.     unsigned int        reaction:1;
  47.     unsigned int        selectionByRect:1;
  48.     unsigned int        _RESERVED:7;
  49.     unsigned int        _autosizeCells:1;
  50.     unsigned int        _drawingAncestor:1;
  51. #else
  52.     unsigned int        _drawingAncestor:1;
  53.     unsigned int        _autosizeCells:1;
  54.     unsigned int        _RESERVED:7;
  55.     unsigned int        selectionByRect:1;
  56.     unsigned int        reaction:1;
  57.     unsigned int        autoscroll:1;
  58.     unsigned int        allowEmptySel:1;
  59.     unsigned int        listMode:1;
  60.     unsigned int        radioMode:1;
  61.     unsigned int        highlightMode:1;
  62. #endif
  63.     }                   mFlags;
  64.     unsigned short      _reservedMshort1;
  65.     unsigned int        _reservedMint1;
  66.     void            *_private;
  67. }
  68.  
  69. + initialize;
  70. + setCellClass:factoryId;
  71.  
  72. - initFrame:(const NXRect *)frameRect;
  73. - initFrame:(const NXRect *)frameRect mode:(int)aMode prototype:aCell numRows:(int)rowsHigh numCols:(int)colsWide;
  74. - initFrame:(const NXRect *)frameRect mode:(int)aMode cellClass:factoryId numRows:(int)rowsHigh numCols:(int)colsWide;
  75.  
  76. - free;
  77. - setCellClass:factoryId;
  78. - prototype;
  79. - setPrototype:aCell;
  80. - makeCellAt:(int)row :(int)col;
  81. - (int)mode;
  82. - setMode:(int)aMode;
  83. - setEmptySelectionEnabled:(BOOL)flag;
  84. - (BOOL)isEmptySelectionEnabled;
  85. - sendAction:(SEL)aSelector to:anObject forAllCells:(BOOL)flag;
  86. - cellList;
  87. - selectedCell;
  88. - getSelectedCells:(List *)aList;
  89. - (int)selectedRow;
  90. - (int)selectedCol;
  91. - setSelectionByRect:(BOOL)flag;
  92. - (BOOL)isSelectionByRect;
  93. - setSelectionFrom:(int)startPos to:(int)endPos anchor:(int)anchorPos lit:(BOOL)lit;
  94. - clearSelectedCell;
  95. - selectCellAt:(int)row :(int)col;
  96. - selectAll:sender;
  97. - selectCell:aCell;
  98. - selectCellWithTag:(int)anInt;
  99. - getCellSize:(NXSize *)theSize;
  100. - setCellSize:(const NXSize *)aSize;
  101. - getIntercell:(NXSize *)theSize;
  102. - setIntercell:(const NXSize *)aSize;
  103. - setEnabled:(BOOL)flag;
  104. - setScrollable:(BOOL)flag;
  105. - font;
  106. - setFont:fontObj;
  107. - (float)backgroundGray;
  108. - setBackgroundGray:(float)value;
  109. - setBackgroundColor:(NXColor)color;
  110. - (NXColor)backgroundColor;
  111. - setBackgroundTransparent:(BOOL)flag;
  112. - (BOOL)isBackgroundTransparent;
  113. - setCellBackgroundColor:(NXColor)color;
  114. - (NXColor)cellBackgroundColor;
  115. - setCellBackgroundTransparent:(BOOL)flag;
  116. - (BOOL)isCellBackgroundTransparent;
  117. - (float)cellBackgroundGray;
  118. - setCellBackgroundGray:(float)value;
  119. - setState:(int)value at:(int)row :(int)col;
  120. - setIcon:(const char *)iconName at:(int)row :(int)col;
  121. - setTitle:(const char *)aString at:(int)row :(int)col;
  122. - (int)cellCount;
  123. - getNumRows:(int *)rowCount numCols:(int *)colCount;
  124. - cellAt:(int)row :(int)col;
  125. - getCellFrame:(NXRect *)theRect at:(int)row :(int)col;
  126. - getRow:(int *)row andCol:(int *)col ofCell:aCell;
  127. - getRow:(int *)row andCol:(int *)col forPoint:(const NXPoint *)aPoint;
  128. - renewRows:(int)newRows cols:(int)newCols;
  129. - putCell:newCell at:(int)row :(int)col;
  130. - addRow;
  131. - insertRowAt:(int)row;
  132. - removeRowAt:(int)row andFree:(BOOL)flag;
  133. - addCol;
  134. - insertColAt:(int)col;
  135. - removeColAt:(int)col andFree:(BOOL)flag;
  136. - findCellWithTag:(int)anInt;
  137. - setTag:(int)anInt at:(int)row :(int)col;
  138. - target;
  139. - setTarget:anObject;
  140. - setTarget:anObject at:(int)row :(int)col;
  141. - (SEL)action;
  142. - setAction:(SEL)aSelector;
  143. - (SEL)doubleAction;
  144. - setDoubleAction:(SEL)aSelector;
  145. - (SEL)errorAction;
  146. - setErrorAction:(SEL)aSelector;
  147. - setAction:(SEL)aSelector at:(int)row :(int)col;
  148. - setTag:(int)anInt target:anObject action:(SEL)aSelector at:(int)row :(int)col;
  149. - setAutosizeCells:(BOOL)flag;
  150. - (BOOL)doesAutosizeCells;
  151. - sizeTo:(float)width :(float)height;
  152. - sizeToCells;
  153. - sizeToFit;
  154. - validateSize:(BOOL)flag;
  155. - calcSize;
  156. - drawCell:aCell;
  157. - drawCellInside:aCell;
  158. - drawCellAt:(int)row :(int)col;
  159. - highlightCellAt:(int)row :(int)col lit:(BOOL)flag;
  160. - drawSelf:(const NXRect *)rects :(int)rectCount;
  161. - display;
  162. - setAutoscroll:(BOOL)flag;
  163. - scrollCellToVisible:(int)row :(int)col;
  164. - setReaction:(BOOL)flag;
  165. - (int)mouseDownFlags;
  166. - mouseDown:(NXEvent *)theEvent;
  167. - (BOOL)performKeyEquivalent:(NXEvent *)theEvent;
  168. - sendAction:(SEL)theAction to:theTarget;
  169. - sendAction;
  170. - sendDoubleAction;
  171. - textDelegate;
  172. - setTextDelegate:anObject;
  173. - (BOOL)textWillEnd:textObject;
  174. - (BOOL)textWillChange:textObject;
  175. - textDidEnd:textObject endChar:(unsigned short)whyEnd;
  176. - textDidChange:textObject;
  177. - textDidGetKeys:textObject isEmpty:(BOOL)flag;
  178. - selectText:sender;
  179. - selectTextAt:(int)row :(int)col;
  180. - setPreviousText:anObject;
  181. - setNextText:anObject;
  182. - (BOOL)acceptsFirstMouse;
  183. - write:(NXTypedStream *)stream;
  184. - read:(NXTypedStream *)stream;
  185. - resetCursorRects;
  186.  
  187. /* 
  188.  * The following new... methods are now obsolete.  They remain in this  
  189.  * interface file for backward compatibility only.  Use Object's alloc method  
  190.  * and the init... methods defined in this class instead.
  191.  */
  192. + newFrame:(const NXRect *)frameRect;
  193. + newFrame:(const NXRect *)frameRect mode:(int)aMode prototype:aCell numRows:(int)rowsHigh numCols:(int)colsWide;
  194. + newFrame:(const NXRect *)frameRect mode:(int)aMode cellClass:factoryId numRows:(int)rowsHigh numCols:(int)colsWide;
  195.  
  196.  
  197. @end
  198.  
  199. #ifdef KANJI
  200. @interface Matrix(InputManager)
  201. - setIMEnabled:(BOOL)flag;
  202. @end
  203.  
  204. @interface Matrix(IMSupportDelegate)
  205. - (BOOL)textUsesIM:sender;
  206. @end
  207. #endif
  208.